package com.example.presentshopping.ui.activity

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.example.presentshopping.R
import com.example.presentshopping.config.base.BaseMvpActivity
import com.example.presentshopping.mvp.presenter.PublicPresenter
import com.example.presentshopping.net.http.HttpURL
import com.example.presentshopping.utils.ToastUtil
import kotlinx.android.synthetic.main.activity_refundetail.*
import kotlinx.android.synthetic.main.activity_refundetail.title_main_tv
import kotlinx.android.synthetic.main.activity_wallet.*

class WalletActivity : BaseMvpActivity() {



    private var queryInfoPresenter: PublicPresenter? = null
    override val layoutId: Int
        get() = R.layout.activity_wallet

    override fun initView(savedInstanceState: Bundle?) {
        queryInfoPresenter = PublicPresenter(this,false,"")
        queryInfoPresenter?.attachView(this)
        title_main_tv.leftBackImageTv.setOnClickListener { finish() }
        iv_share3.setOnClickListener { startActivity(Intent(this,PaybyAlipayActivity().javaClass))  }
     iv_share.setOnClickListener {showToast("功能暂未开放") /*startActivity(Intent(this,AddBankCardActivity().javaClass))*/}
        iv_share1.setOnClickListener {
            val initx =Intent(this,GoldSActivity().javaClass)
            initx.putExtra("url" , HttpURL.Req_balanceChange)
            initx.putExtra("telie" , "兑换金币")
            startActivity(initx)

        }

    }

    override fun showToast(msg: String?) {
        ToastUtil.showMsg(msg)
    }


    override fun onDestroy() {
        queryInfoPresenter?.detachView()
        super.onDestroy()
    }

    override fun onSuccess(data: String?) {

    }



    override fun onFailure(e: Throwable?, code: Int, msg: String?, isNetWorkError: Boolean) {

    }
}